<iframe th:replace="common/top.html" width="100%" frameborder="0" scrolling="yes" class="x-iframe"></iframe>

<div id="Catalog">
    <form action="/editeAccount" method="post">

        <p th:if="${errorMSG != null}"><font color="red" th:text="${errorMSG}"></font></p>

        <h3>User Information</h3>

<!--        <script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script>-->
<!--        <script>-->
<!--            $(function () {-->
<!--                var username = $('#username');-->

<!--                username.on('blur',function () {-->
<!--                    if(username.val()===''){-->
<!--                        console.log("ok?");-->
<!--                    }else{-->
<!--                        console.log("???");-->
<!--                        $.ajax({-->
<!--                            type    :'POST',-->
<!--                            url     :'check?username='+username.val(),-->
<!--                            // data    :{"username":username.val()},-->
<!--                            success :function (data) {-->
<!--                                if(data.name === 'name') {-->
<!--                                    username.val("repeated username");-->
<!--                                }-->
<!--                                console.log(data.name);-->
<!--                                console.log("success")-->
<!--                            },-->
<!--                            error   :function () {-->
<!--                                console.log("error");-->
<!--                            }-->
<!--                        });-->
<!--                    }-->
<!--                })-->
<!--            })-->
<!--        </script>-->
        <table>

            <tr>
                <td>User ID:</td>
                <td>
                    <input type="text" th:value="${session.loginAccount.username}" name="userName" id="userName">
                </td>
            </tr>

            <tr>
                <td>New password:</td>
                <td>
                    <input type="password" name="password">
                </td>
            </tr>

            <tr>
                <td>Repeat password:</td>
                <td>
                    <input type="password" name="repeatPassword">
                </td>
            </tr>

        </table>

        <iframe th:replace="account/IncludeAccount.html" width="100%" frameborder="0" scrolling="yes" class="x-iframe"></iframe>


        <input type="submit" value="Save Account Information">

    </form>
</div>
<iframe th:replace="common/bottom.html" width="100%" frameborder="0" scrolling="yes" class="x-iframe"></iframe>
